Many software and hardware applications use application programming interfaces (APIs) to access other hardware or software applications. APIs can be used to retrieve data or to invoke a specific function from another application. For example, software tools, which are used to develop hardware or software applications, can use an API to access a database of devices or functions available for developing specific applications.
FIG. 1 illustrates a computer aided design (CAD) tool 100. CAD tool 100 includes design modules 105, 110, 115, and 120, which perform different design-related tasks. In an embodiment, CAD tool 100 is used to develop user-defined applications for programmable logic devices. In this embodiment, example design modules include a placer 105, router 110, timing analyzer 115, and assembler 120. In other embodiments, the number and function of the design modules will vary.
The design modules communicate with a device database 125 to retrieve device information for the numerous devices available to a designer. Device information includes operating parameters, which define a device, and an API, which enables access to a device's operating parameters and functions. The device information, including the operating parameters and API associated with each device, are stored in data classes in the device database 125.
When a new device becomes available, the operating parameters and API associated with the new device must be integrated with the CAD tool 100 before designers can use the device in their designs. Device data files 130 define device operating parameters and API. A parser 135 processes the device data files and inserts the device operating parameters and API into an appropriate data class stored in the device database 125. Header files 140 contain programming declarations for a device's operating parameters and API. Both the design modules and user applications use the programming declarations in the header files 140 to identify and access devices. A location class 145 stores location information for devices. As discussed below, the device data files 130, the header files 140, and the location class 145 must be modified to integrate new devices with the CAD tool 100.
FIG. 2 illustrates a method 200 for integrating new devices with the CAD tool 100. A device database engineer, who is responsible for maintaining the device database and the header files, typically performs the integration process. At step 210, a device database engineer creates or modifies device data files to define the operating parameters and API for the new device. At step 220, the device database engineer adds programming declarations to the header files. The programming declarations correspond to the operating parameters and API defined in the device data files. If the device data file includes new data types, then at step 230 the device database engineer needs to modify the parser 135 to handle the new data types. Additionally, the data classes in the device database 125 need to be modified to include new data or devices at step 240. A new location class is then created for a new device at step 250. Finally, at step 260, any design module or application depending on any modified class is recompiled with the modified header files.
The method 200 for integrating new devices into the CAD tool 100 is fraught with complications. Not only do the numerous steps of the method require substantial engineering effort for each device added, each step introduces the possibility of human error. Moreover, device operating parameters and APIs are constantly being added or modified, making device integration a continuous chore.
Recompilation of design modules and user applications is another substantial flaw with this method. Recompilation of complicated design modules and user applications can take many hours to process. Further, the integration of new devices breaks older versions of the design modules and user applications until they are recompiled, even when the design modules and user applications do not use the new devices.
Thus, it is desirable to: 1) minimize the engineering effort needed to integrate new devices with CAD tools; 2) reduce the possibility of human error when adding new devices; and 3) eliminate the need to recompile design modules and user applications when new devices are added.